package cn.hadron.ssh.action;
import cn.hadron.ssh.util.Pager;
import cn.hadron.ssh.bean.Article;
import cn.hadron.ssh.service.*;

import com.opensymphony.xwork2.ActionSupport;
public class IndexAction extends ActionSupport {
	private int id;
	private Pager<Article> pager ;
	private ArticleService as;
	@Override
	public String execute() throws Exception {
		pager = as.getPager(id, 6);
		pager.setUrl("index");
		return SUCCESS;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Pager<Article> getPager() {
		return pager;
	}
	public void setPager(Pager<Article> pager) {
		this.pager = pager;
	}
	public ArticleService getAs() {
		return as;
	}
	public void setAs(ArticleService as) {
		this.as = as;
	}
}